package com.ting.encrypt.encrypt;

import com.ting.common.utils.RSAUtil;
import com.ting.common.utils.SM4Util;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

public class DefaultSM4Encrypt implements BaseEncrypt {

    private static String rsaPublicKey;

    private static String rsaPrivateKey;

    public DefaultSM4Encrypt() {
    }

    public DefaultSM4Encrypt(String rsaPublicKey, String rsaPrivateKey) {
        DefaultSM4Encrypt.rsaPublicKey = rsaPublicKey;
        DefaultSM4Encrypt.rsaPrivateKey = rsaPrivateKey;
    }

    @Override
    public String encrypt(String var1) {
        return SM4Util.encrypt(var1);
    }

    @Override
    public String decrypt(String var1) {
        return SM4Util.decrypt(var1);
    }
}
